//引入 redux
import { createStore, applyMiddleware, combineReducers } from 'redux'

//引入countReducer
import countReducer from './reducers/countReducer'
//引入movieReducer
import movieReducer from './reducers/movieReducer'
import thunk from 'redux-thunk'
console.log('store调用了');
//使用redux提供的combineReducers的方法 合并多个reducer
const allReducer = combineReducers({
  movie: movieReducer,
  count: countReducer
})
//关联
const store = createStore(allReducer, applyMiddleware(thunk))

export default store